﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SqlBuilder
{
    public class TableStructure
    {
        public string? Name { get; set; }
        public string? Comments { get; set; } 
        public List<Column> Columns {  get; set; } = new List<Column>();

        public override bool Equals(object? obj)
        {
            if (obj is TableStructure)
                return ((TableStructure)obj).Name == this.Name;
            return false;
        }
        public override int GetHashCode()
        {
            return Name!.GetHashCode();
        }

        public override string ToString()
        {
            return Functions.SerializeObject(this);
        }
    }
}
